import {createApp} from 'vue';
import ElementPlus from 'element-plus';
import locale from 'element-plus/lib/locale/lang/zh-cn';
import vClickOutside from 'click-outside-vue3';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import App from './App.vue';
import router from '@/router';
import store from '@/store';
import http from '@/api/request';

import 'element-plus/dist/index.css';
import './utils/rem';
import './index.css';
import './assets/css/rebuildElement.scss';

const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.config.globalProperties.$http = http;
app.config.globalProperties.$version = 'V 0.0.7';

app.use(store);
app.use(router);
app.use(ElementPlus, {locale});
app.use(vClickOutside);

app.mount('#app');
